﻿<%@ Page Title="Populate Alternate Field" Language="C#" MasterPageFile="~/Demo.master"
    Inherits="DemoPage" %>

<%@ Register Src="~/CodeFormatter.ascx" TagName="Code" TagPrefix="demo" %>

<script runat="server">

</script>

<asp:Content ID="Content1" ContentPlaceHolderID="DemoHolder" runat="Server">
    <div class="dna-state-help ui-corner-all" style="margin-bottom: 10px;">
        Populate an alternate field with its own date format whenever a date is selected
        using the <b>AnotherField</b> and AnotherFormat properties. This feature could
        be used to present a human-friendly date for user selection, while passing a more
        computer-friendly date through for further processing.
    </div>
    <br />
    <span>
        <DotNetAge:DatePicker ID="SampleDatePicker" runat="server" AnotherFormat="yyyy/MM/dd">
            <AnotherField TargetID="anotherDateText" />
        </DotNetAge:DatePicker>
        <asp:TextBox ID="anotherDateText" runat="server"></asp:TextBox></span>
    <br />
    <br />
    <demo:Code ID="subCodes" runat="server">
        <Code>&lt;DotNetAge:DatePicker ID=&quot;SampleDatePicker&quot; runat=&quot;server&quot; AnotherFormat=&quot;yyyy/MM/dd&quot;&gt;
  &lt;AnotherField TargetID=&quot;anotherDateText&quot; /&gt;
&lt;/DotNetAge:DatePicker&gt;
&lt;asp:TextBox ID=&quot;anotherDateText&quot; runat=&quot;server&quot;&gt;&lt;/asp:TextBox&gt;</Code>
    </demo:Code>
</asp:Content>
